classes = [
    {"name": "abyss", "age": 25, "grade": "A"},
    {"name": "kin", "age": 23, "grade": "B"},
    {"name": "tian", "age": 24, "grade": "B"},
    {"name": "hun", "age": 26, "grade": "A"},
    {"name": "exe", "age": 21, "grade": "A"}
]


# 第一题
result = sorted(classes, key=lambda x: x['age'])
# 第二题
for i, j in zip(classes, map(lambda x: x['age']+1, classes)): 
    i['age'] = j
# 第三题
filter_result = filter(lambda x: x['grade'] != "A", classes)


# 第四题
class ParamsTypeError(Exception):
    """参数类型错误"""
    pass


def using_for_recurrence(n):
    """使用递归，求斐波那契数列"""
    try:
        n = int(n)
    except Exception:
        raise ParamsTypeError("please input Integer")

    if n == 1:
        return 0
    if n == 2:
        return 1
    return using_for_recurrence(n - 1) + using_for_recurrence(n - 2)
